<?php

use Drupal\mxm_article\Entity\MxmArticle;

function mxm_article_mxm_article_add_page() {
  $e = new MxmArticle();
  module_load_include('inc', 'mxm_article', 'mxm_article.forms');
  return drupal_get_form('mxm_article_mxm_article_entity_form', $e, 'add');
}

function mxm_article_mxm_article_view_page(MxmArticle $e) {
  return entity_view($e->entityType(), [$e]);
}

function mxm_article_mxm_article_edit_page(MxmArticle $e) {
  module_load_include('inc', 'mxm_article', 'mxm_article.forms');
  return drupal_get_form('mxm_article_mxm_article_entity_form', $e, 'edit');
}

function mxm_article_mxm_article_delete_page(MxmArticle $e) {
  module_load_include('inc', 'mxm_article', 'mxm_article.forms');
  return drupal_get_form('mxm_article_mxm_article_delete_form', $e);
}

